<template>
  <el-dialog :title="titleName" v-model="dialogVisible" :width="dialogWidth">
    <div style="margin-bottom: 10px">
        <slot name="content"></slot>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="ok">保 存</el-button>
    </span>
  </el-dialog>
</template>
<script lang="ts" setup name="details">
import { ref } from 'vue'
const dialogVisible = ref(false)
const titleName = ref('提示')
const dialogWidth=ref('50%');

const props = defineProps(['detailSave']);

const ok = () => {
  props.detailSave();
}

const loadPage = (title: string,dialog_Width:string) => {
  titleName.value = title
  dialogVisible.value = true
  dialogWidth.value = dialog_Width;
}

defineExpose({ loadPage,dialogVisible })
</script>
<style scoped>
</style>